	<div class="column half fl">
		
		<div class="box themed_box">
		<h2 class="box-header"><?php echo $title; ?></h2>

		<div class="box-content">
        <?php echo $this->session->flashdata('message'); ?>
		
   
        <form id="formtest" name="formtest" method="post" action="<?php echo site_url($form['action']); ?>">
            <?php if($table['value']<>"") { ?>
            <input type="hidden" name="id" value="<?php echo $table['value']['id']; ?>" />
            <?php } ?>
            
            <label class="form-label"><?php echo $this->lang->line('status'); ?></label>
            <select  class="form-field width60" id="select" name="status" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['status_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['status_name']; } ?></option>
    				<?php foreach($table['status'] as $rowstatus): ?>
                    <option value="<?php echo $rowstatus['id']; ?>"><?php echo $rowstatus['status_name']; ?></option>
					<?php endforeach;?>
            </select>
            <br />
            
            <label class="form-label"><?php echo $this->lang->line('from'); ?></label>
            <?php
                $from=array('Manajemen'=>'Manajemen','Mandiri'=>'Mandiri');
                if($table['value']<>''){
                    $fromg=$table['value']['customer_from'];
                } else {
                     $fromg='';
                }
            ?>
            <?=form_dropdown('from',$from,$fromg,'class="form-field width60" id="select" title="Select a category"')?>

            <br />
            
            <label class="form-label required"><?php echo $this->lang->line('cust_name'); ?></label>
			<input id="form-name" autocomplete="off" class="form-field width80" name="name" type="text"  value="<?php if($table['value']<>"") { echo $table['value']['customer_name']; } ?> " maxlength="50"/>
            
            
            <label class="form-label"><?php echo $this->lang->line('sector'); ?></label>
            <select class="form-field width60" id="select" name="sector" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['sector_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['sector_name']; } ?></option>
    			<?php foreach($table['sectors'] as $rowsector): ?>
                    <option value="<?php echo $rowsector['id']; ?>"><?php echo $rowsector['sector_name']; ?></option>
                <?php endforeach;?>
            </select>
            <br />
            <label class="form-label"><?php echo $this->lang->line('group'); ?></label>
            <select  class="form-field width60" id="select" name="group" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['group_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['group_name']; } ?></option>
    			
    				<?php foreach($table['groups'] as $rowgroup): ?>
                    <option value="<?php echo $rowgroup['id']; ?>"><?php echo $rowgroup['group_name']; ?></option>
					<?php endforeach;?>
            </select>
            <br />
            <label class="form-label"><?php echo $this->lang->line('source'); ?></label>
            <select class="form-field width60" id="select" name="source" title="Select a category">
                    <option value="<?php if($table['value']<>"") { echo $table['value']['source_id']; } ?>" ><?php if($table['value']<>"") { echo $table['value']['source_name']; } ?></option>
    			<?php foreach($table['sources'] as $rowsource): ?>
                    <option value="<?php echo $rowsource['id']; ?>"><?php echo $rowsource['source_name']; ?></option>
                <?php endforeach;?>
            </select>
            <br />
            
			 <label class="form-label required"><?php echo $this->lang->line('tlp'); ?></label>
			<input id="form-tlp" class="form-field width60" name="tlp" type="text" value="<?php if($table['value']<>"") { echo $table['value']['tlp']; } ?>" maxlength="100"/>
			
            
			<label class="form-label required"><?php echo $this->lang->line('pic'); ?></label>
			<?php $option=array('Bpk'=>'Bpk','Ibu'=>'Ibu','Sdra'=>'Sdra','Sdri'=>'Sdri');?>
			<?=form_dropdown("fn",$option);?>
			<input id="form-pic" class="form-field width60" name="pic" type="text" value="<?php if($table['value']<>"") { echo $table['value']['pic']; } ?>" maxlength="100"/>
			
            <label class="form-label required"><?php echo $this->lang->line('pos'); ?></label>
			<input id="form-picpos" class="form-field width60" name="pic_pos" type="text" value="<?php if($table['value']<>"") { echo $table['value']['pic_pos']; } ?>" maxlength="100"/>
			
			<label class="form-label"><?php echo $this->lang->line('email'); ?></label>
			<input id="form-email" class="form-field width60" name="email" type="text" value="<?php if($table['value']<>"") { echo $table['value']['email']; } ?>" maxlength="100"/>
			
			<label class="form-label"><?php echo $this->lang->line('con_email'); ?></label>
			<input id="form-confirmemail" class="form-field width60" name="email_confirm" type="text" value="<?php if($table['value']<>"") { echo $table['value']['email']; } ?>" maxlength="100"/>
            
			<label class="form-label required"><?php echo $this->lang->line('ext'); ?></label>
			<input id="form-tlp" class="form-field width60" name="ext" type="text" value="<?php if($table['value']<>"") { echo $table['value']['ext']; } ?>" maxlength="100"/>
			
			<label class="form-label required"><?php echo $this->lang->line('hp'); ?></label>
			<input id="form-hp" class="form-field width60" name="hp" type="text" value="<?php if($table['value']<>"") { echo $table['value']['hp']; } ?>" maxlength="100"/>
			
			
            <label class="form-label required"><?php echo $this->lang->line('pic').'2'; ?></label>
			<?=form_dropdown("fn2",$option);?>
			<input id="form-pic2" class="form-field width60" name="pic2" type="text" value="<?php if($table['value']<>"") { echo $table['value']['pic2']; } ?>" maxlength="100"/>
			
            <label class="form-label required"><?php echo $this->lang->line('pos'); ?></label>
			<input id="form-picpos" class="form-field width60" name="pic2_pos" type="text" value="<?php if($table['value']<>"") { echo $table['value']['pic2_pos']; } ?>" maxlength="100"/>
			
            <label class="form-label"><?php echo $this->lang->line('email'); ?></label>
			<input id="form-email2" class="form-field width60" name="email2" type="text" value="<?php if($table['value']<>"") { echo $table['value']['email2']; } ?>" maxlength="100"/>
			
			<label class="form-label"><?php echo $this->lang->line('con_email'); ?></label>
			<input id="form-confirmemail2" class="form-field width60" name="email2_confirm" type="text" value="<?php if($table['value']<>"") { echo $table['value']['email2']; } ?>" maxlength="100"/>
            
			<label class="form-label required"><?php echo $this->lang->line('ext'); ?></label>
			<input id="form-ext" class="form-field width60" name="ext2" type="text" value="<?php if($table['value']<>"") { echo $table['value']['ext2']; } ?>" maxlength="100"/>
			
            <label class="form-label required"><?php echo $this->lang->line('hp'); ?></label>
			<input id="form-hp2" class="form-field width60" name="hp2" type="text" value="<?php if($table['value']<>"") { echo $table['value']['hp2']; } ?>" maxlength="100"/>
			
           
            <label class="form-label required"><?php echo $this->lang->line('fax'); ?></label>
			<input id="form-fax" class="form-field width60" name="fax" type="text" value="<?php if($table['value']<>"") { echo $table['value']['fax']; } ?>" maxlength="100"/>
			
            
			
			<label class="form-label"><?php echo $this->lang->line('address'); ?></label>
			<input id="form-address" class="form-field width60" name="address" type="text" value="<?php if($table['value']<>"") { echo $table['value']['address']; } ?>" maxlength="100"/>
			
            
           	<label class="form-label"><?php echo $this->lang->line('city'); ?></label>
			<input id="form-city" class="form-field width60" name="city" type="text" value="<?php if($table['value']<>"") { echo $table['value']['city']; } ?>" maxlength="100"/>
            
            <label class="form-label"><?php echo $this->lang->line('zipcode'); ?></label>
			<input id="form-zip" class="form-field width60" name="zipcode" type="text" value="<?php if($table['value']<>"") { echo $table['value']['zip_code']; } ?>" maxlength="50"/>
			
            <label class="form-label"><?php echo $this->lang->line('note'); ?></label>
			<textarea id="form-message" class="form-field width90" name="desc" cols="" rows="2"><?php if($table['value']<>"") { echo $table['value']['desc']; } ?></textarea>
			
            <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
            <label class="form-label"><?php echo $this->lang->line('ta'); ?></label>
			<?php 
				if($table['value']<>"") {
					$val = $table['value']['rev'];
				} else {
					$val ='';
				}    
			?>
			
			<?=form_dropdown('ta',$table['ta'],$val);?>
			
			<label class="form-label"><?php echo $this->lang->line('se'); ?></label>
			<?php 
				if($table['value']<>"") {
					$val = $table['value']['rev2'];
				} else {
					$val ='';
				}    
			?>
			
			<?=form_dropdown('se',$table['se'],$val);?>
			
			<label class="form-label"><?php echo $this->lang->line('ae'); ?></label>
			<?php 
				if($table['value']<>"") {
					$val = $table['value']['rev3'];
				} else {
					$val ='';
				}    
			?>
			
			<?=form_dropdown('ae',$table['ae'],$val);?>
			
			<label class="form-label"><?='SE APPROVE';?></label>
			<?php 
				if($table['value']<>"") {
					$val = $table['value']['se_name'];
				} else {
					$val ='';
				}    
			?>
			
			<?=form_dropdown('se_approve',$table['se'],$val);?>
			
			<label class="form-label"><?='SPV APPROVE';?></label>
			<?php 
				if($table['value']<>"") {
					$val = $table['value']['spv_name'];
				} else {
					$val ='';
				}    
			?>
			
			<?=form_dropdown('spv_approve',$table['spv'],$val);?>
			
            <?php else:  ?>
                <input id="form-" class="form-field width20" name="rev" type="hidden" value="<?php if($table['value']<>"") { echo $table['value']['rev']; } ?>" maxlength="100"/>
            <?php endif; ?>
            
			<br/>
			<input id="reset" class="button red" type="button" value="Reset" name="reset" />
			<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
		</form>
		</div>

		</div>	
			
	</div>

	
	<div class="column half fr">
	
	<?php if($this->session->userdata('user_group')== $this->config->item('admin')):?>
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('sector'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message2'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('sector'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['sectors'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['sector_name']; ?></h5>
		
						</td>
						<td class="tc">

							<span class="bullet bullet-green"></span>
						</td>
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<td class="tc">
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<?php echo form_open($this->config->item('sect_update')); ?>
                        <td colspan="4">
							<div class="fl typo">
							<b><?php $this->config->item('sector'); ?></b>
							<p class="p_justify">
                              <input id="form-id" name="id" type="hidden" value="<?php echo $rec['id']; ?>" />
							  <input id="form-name" class="form-field width150" name="name" type="text" value="<?php echo $rec['sector_name']; ?>" maxlength="200"/>
							</p>
							</div>

							<div class="fl typo">
								<b>Published by: </b>
								<a href="#"><?php echo $rec['user_stamp']; ?></a> 
							</div>

							
							<div class="s_3"></div>
							
							<div class="fl typo">
								<b>Published date: </b>
                                <?php if($rec['date_stamp']=='0000-00-00'): ?>
                                    -
                                <?php else: ?>
								<a href="#"><?php echo $rec['date_stamp']; ?></a>
                                <?php endif; ?> 
							</div>
						
							<div class="fr">
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('delete');?>" name="delete" />
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						<?php echo form_close();?>
						<div class="clear"></div>
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
                          <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
							<h5><?php echo $this->lang->line('add'); ?></h5>
		                  <?php endif; ?>
						</td>
						<td class="tc">

							
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($this->config->item('sect_save')); ?>
							<div class="fl typo">
							<b><?php $this->config->item('pos'); ?></b>
							<p class="p_justify">
							  <input id="form-name" class="form-field width150" name="name" type="text" value="" maxlength="200"/>
							</p>
							</div>

							<div class="s_3"></div>
							
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
		<?php endif;?>
        
		<?php if($this->session->userdata('user_group')== $this->config->item('admin')):?>
        <div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('group'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message3'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('group'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['groups'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['group_name']; ?></h5>
		
						</td>
						<td class="tc">

							<span class="bullet bullet-green"></span>
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<?php echo form_open($this->config->item('group_update')); ?>
                        <td colspan="4">
							<div class="fl typo">
							<b><?php $this->config->item('sector'); ?></b>
							<p class="p_justify">
                              <input id="form-id" name="id" type="hidden" value="<?php echo $rec['id']; ?>" />
							  <input id="form-name" class="form-field width150" name="name" type="text" value="<?php echo $rec['group_name']; ?>" maxlength="200"/>
							</p>
							</div>

							<div class="fl typo">
								<b>Published by: </b>
								<a href="#"><?php echo $rec['user_stamp']; ?></a> 
							</div>

							
							<div class="s_3"></div>
							
							<div class="fl typo">
								<b>Published date: </b>
                                <?php if($rec['date_stamp']=='0000-00-00'): ?>
                                    -
                                <?php else: ?>
								<a href="#"><?php echo $rec['date_stamp']; ?></a>
                                <?php endif; ?> 
							</div>
						
							<div class="fr">
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('delete');?>" name="delete" />
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						<?php echo form_close();?>
						<div class="clear"></div>
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
                         <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
							<h5><?php echo $this->lang->line('add'); ?></h5>
		                 <?php endif;?> 
						</td>
						<td class="tc">

							
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($this->config->item('group_save')); ?>
							<div class="fl typo">
							<b><?php $this->config->item('group'); ?></b>
							<p class="p_justify">
							  <input id="form-name" class="form-field width150" name="name" type="text" value="" maxlength="200"/>
							</p>
							</div>

							<div class="s_3"></div>
							
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
		<?php endif;?>
        
		<?php if($this->session->userdata('user_group')== $this->config->item('admin')):?>
        <div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('source'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message4'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('source'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['sources'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['source_name']; ?></h5>
		
						</td>
						<td class="tc">

							<span class="bullet bullet-green"></span>
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<?php echo form_open($this->config->item('source_update')); ?>
                        <td colspan="4">
							<div class="fl typo">
							<b><?php $this->config->item('source'); ?></b>
							<p class="p_justify">
                              <input id="form-id" name="id" type="hidden" value="<?php echo $rec['id']; ?>" />
							  <input id="form-name" class="form-field width150" name="name" type="text" value="<?php echo $rec['source_name']; ?>" maxlength="200"/>
							</p>
							</div>

							<div class="fl typo">
								<b>Published by: </b>
								<a href="#"><?php echo $rec['user_stamp']; ?></a> 
							</div>

							
							<div class="s_3"></div>
							
							<div class="fl typo">
								<b>Published date: </b>
                                <?php if($rec['date_stamp']=='0000-00-00'): ?>
                                    -
                                <?php else: ?>
								<a href="#"><?php echo $rec['date_stamp']; ?></a>
                                <?php endif; ?> 
							</div>
						
							<div class="fr">
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('delete');?>" name="delete" />
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						<?php echo form_close();?>
						<div class="clear"></div>
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
                         <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
							<h5><?php echo $this->lang->line('add'); ?></h5>
		                 <?php endif;?> 
						</td>
						<td class="tc">

							
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($this->config->item('source_save')); ?>
							<div class="fl typo">
							<b><?php $this->config->item('source'); ?></b>
							<p class="p_justify">
							  <input id="form-name" class="form-field width150" name="name" type="text" value="" maxlength="200"/>
							</p>
							</div>

							<div class="s_3"></div>
							
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
		<?php endif;?>
        
		<?php if($this->session->userdata('user_group')== $this->config->item('admin')):?>
        <div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('status'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message5'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['status'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['status_name']; ?></h5>
		
						</td>
						<td class="tc">

							<span class="bullet bullet-green"></span>
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						<a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<?php echo form_open($this->config->item('status_update')); ?>
                        <td colspan="4">
							<div class="fl typo">
							<b><?php $this->config->item('status'); ?></b>
							<p class="p_justify">
                              <input id="form-id" name="id" type="hidden" value="<?php echo $rec['id']; ?>" />
							  <input id="form-name" class="form-field width150" name="name" type="text" value="<?php echo $rec['status_name']; ?>" maxlength="200"/>
							</p>
							</div>

							<div class="fl typo">
								<b>Published by: </b>
								<a href="#"><?php echo $rec['user_stamp']; ?></a> 
							</div>

							
							<div class="s_3"></div>
							
							<div class="fl typo">
								<b>Published date: </b>
                                <?php if($rec['date_stamp']=='0000-00-00'): ?>
                                    -
                                <?php else: ?>
								<a href="#"><?php echo $rec['date_stamp']; ?></a>
                                <?php endif; ?> 
							</div>
						
							<div class="fr">
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('delete');?>" name="delete" />
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						<?php echo form_close();?>
						<div class="clear"></div>
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
                         <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
							<h5><?php echo $this->lang->line('add'); ?></h5>
                        <?php endif;?>
						</td>
						<td class="tc">

							
						</td>
						<td class="tc">
                        <?php if(($this->session->userdata('user_group')== $this->config->item('admin')) || ($this->session->userdata('user_group')== $this->config->item('co_admin'))):?>
						  <a class="button themed openable"><span class="icon_single extend"></span></a>
                        <?php endif;?>  
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($this->config->item('status_save')); ?>
							<div class="fl typo">
							<b><?php $this->config->item('pos'); ?></b>
							<p class="p_justify">
							  <input id="form-name" class="form-field width150" name="name" type="text" value="" maxlength="200"/>
							</p>
							</div>

							<div class="s_3"></div>
							
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
		<?php endif;?>
		
		<?php if($this->session->userdata('user_group')<> $this->config->item('admin')):?>
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('job'); ?></h2>
			
			<div class="box-content box-table">
			
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('no'); ?></th>
                        <th><?php echo $this->lang->line('date');?></th>
                        <th><?php echo 'Product'; ?></th>
						<th><?php echo 'Value'; ?></th>
                        <th><?php echo $this->lang->line('batch'); ?></th>
                        <th><?php echo $this->lang->line('pic'); ?></th>
						<th><?php echo $this->lang->line('download'); ?></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php 
					$i=1; 
					$total=0;
					?>
					<?php foreach($table['jobs'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td>
							<h5><?=anchor('jobs/crm/view/'.$rec['id'],$rec['no']); ?></h5>
		
						</td>
                        <td>

							<h5><?php echo $rec['date_posting']; ?></h5>
						</td>
                        
                        
                        <td>
						<h5><?php echo $rec['product_name']; ?></h5>
                        
						</td>
						
						<td>
						<h5>
						<?php
						$total = $total + $rec['total'];	
						echo number_format($rec['total'],0); ?></h5>
                        
						</td>
						
						<td>
						<h5><?php echo $rec['jo_batch']; ?></h5>
                        
						</td>
						
                        <td>
							<h5><?php echo $rec['pic']; ?></h5>
		
						</td>
						
						<td>
						<h5><?=anchor('crm-assets/jo/'.$rec['trr'],$this->lang->line('download'))?></h5>
                        
						</td>
                        
                        
					</tr>
     
                    <?php $i++; endforeach;?>
                    
				</tbody>
				
				<tfoot class="table-header">
					<tr>
						<th></th>
                        <th></th>
                        <th><?php echo '<h5>Total</h5>'; ?></th>
                        <th><h5><?php echo number_format($total,0); ?></h5></th>
                        <th></th>
						<th></th>
						<th></th>
					</tr>
				</tfoot>
				
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>	
		<?php endif;?>
		
		<?php if($this->session->userdata('user_group')<> $this->config->item('admin')):?>
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo 'Note'; ?></h2>
			
			<div class="box-content box-table">
			
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo 'Note'; ?></th>
                        
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php 
					$i=1; 
					$total=0;
					?>
					<?php /*foreach($table['jobs'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;*/
                    ?>
                    <tr class="odd<?php //echo $zebra;?>">
						<td>
							<h5><?php  echo $table['value']['desc']; //echo $rec['information']; ?></h5>
		
						</td>
            
					</tr>
     
                    <?php //$i++; endforeach;?>
                    
				</tbody>
				
				
				
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
		<?php endif;?>
        			
	</div>
	
	<?php if($title<>$this->lang->line('viewprospect')): ?>
	<div class="column full fr">
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo 'Status Update'; ?></h2>
			
			<div class="box-content box-table">
			
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('date'); ?></th>
						<th><?php echo $this->lang->line('time'); ?></th>
						<th><?php echo $this->lang->line('activity'); ?></th>
                        <th><?php echo $this->lang->line('location'); ?></th>
						<th><?php echo $this->lang->line('user'); ?></th>
                        <th><?php echo $this->lang->line('participant'); ?></th>
                        <th><?php echo $this->lang->line('objective'); ?></th>
                        <th><?php echo $this->lang->line('result'); ?></th>
                        <th><?php echo $this->lang->line('follow_up'); ?></th>
                        
						
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['activity'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td>
							<h5><?php echo $rec['activity_date']; ?></h5>
		
						</td>
						<td>
							<h5><?php echo $rec['activity_time']; ?></h5>
		
						</td>
						<td>

							<h5><?php echo $rec['activity_type']; ?></h5>
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_location']; ?></h5>
                        
						</td>
						
						<td>
						<h5><?php echo $rec['pic']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_people']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_objective']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_result']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_follow_up']; ?></h5>
                        
						</td>
                        
                        
                        
						
					</tr>
     
                    <?php $i++; endforeach;?>
                    
				</tbody>
				
				
				
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
        
		
        
        
        			
	</div>
    <?php endif;?>
    
<script type="text/javascript">
    function changeBgr(isi) {
    document.formtest.rev.value = isi;
    document.getElementById('box-con').style.display = 'none';
    } 
</script>  